<template>
    <div class="content">
        <van-nav-bar title="长者信息"/>
        <van-cell-group>
            <van-cell :title="item.title" :value="item.value" v-for="(item, index) in list" :key="index" />
        </van-cell-group>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                base: [
                    {
                        title: "姓名",
                        value: '患者'
                    },
                    {
                        title: "性别",
                        value: '男'
                    },
                    {
                        title: "年龄",
                        value: '52'
                    },
                ],
                tj: [
                    {
                        title: "日期",
                        value: '2020-2-1'
                    },
                    {
                        title: "机构",
                        value: '体检机构'
                    },
                    {
                        title: "科室",
                        value: '血液科'
                    },
                ],
                bl: [
                    {
                        title: "2020-2-1",
                        value: '病历1'
                    },
                    {
                        title: "2021-2-1",
                        value: '病历2'
                    },
                    {
                        title: "2021-5-1",
                        value: '病历3'
                    },
                ],
                id:"base"
            }
        },
        computed: {
            list() {
                return this[this.id];
            }
        },
        created() {
            this.id = this.$route.query.id ? this.$route.query.id :  'base';
        },
    }
</script>
<style>
    .content {
        padding: 2vh;
    }
</style>